/* GUI CONVERTED from ecselbat.i (converter v1.76) Wed Apr  3 17:36:35 2002 */
/* ecselbat.i - INCLUDE FILE TO SELECT BATCH OPTION                           */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.7.1.5 $                                                       */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.4      LAST MODIFIED: 08/16/93   BY: QZL *H013*                */
/* REVISION: 8.5      LAST MODIFIED: 04/24/97   BY: Joe Gawel         *J1PQ*  */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane          */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan         */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/14/00   BY: *N0KW* Jacolyn Neder      */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.7.1.5 $    BY: Jean Miller       DATE: 04/03/02  ECO: *P053*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

define new shared variable dev as character format "x(8)" label "Output".
define new shared variable batch_id like bcd_batch.

define shared variable batch_user as character.

define variable printwidth as integer.
define variable printype as character.

/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

display batch_id with frame a.

do on error undo, retry:
/*GUI*/ if global-beam-me-up then undo, leave.


   set batch_id with frame a
   editing:

      if frame-field = "batch_id" then do:
         {mfnp05.i bc_mstr bc_batch "yes" bc_batch "input batch_id"}
         if recno <> ? then do:
            batch_id = bc_batch.
            display batch_id with frame a.
         end.
      end.
      else do:
         readkey.
         apply lastkey.
      end.

   end.

   if batch_id <> "" then do:
      find bc_mstr where bc_batch = batch_id no-lock no-error.
      if not available bc_mstr then do:
         /* Batch control record does not exist */
         {pxmsg.i &MSGNUM=67 &ERRORLEVEL=3}
         undo, retry.
      end.
   end.

end.
/*GUI*/ if global-beam-me-up then undo, leave.


status input.

if batch_id > "" then do:
   /* Run program for bcd_det record creation */
   {gprun.i ""ecbcdadd.p""}
/*GUI*/ if global-beam-me-up then undo, leave.

end.
